<#include "macro_.ftl">
package ${packageCode}.${moduleMapperKey}.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import ${packageCode}.${moduleMapperKey}.dao.${businessCode}Dao;
<#if businessCode == (moduleMapperKey?cap_first)>

import ${packageCode}.common.service.CommonService;

</#if>
import org.springframework.cache.annotation.CacheEvict;

/**
 * ${businessMapper.name!businessCode}服务
 *
 * @author ${author!'haitao.yao'}
 * 
 */
public class Default${businessCode}Service implements ${businessCode}Service {
	private final static Log log = LogFactory.getLog(${businessCode}Service.class);
	
	private ${businessCode}Dao ${camelCaseBusinessCode}Dao;

	public void set${businessCode}Dao(${businessCode}Dao ${camelCaseBusinessCode}Dao) {
		this.${camelCaseBusinessCode}Dao = ${camelCaseBusinessCode}Dao;
	}
	
	@Override
	@CacheEvict(value = ${businessCode}Service.CACHE_NAME, allEntries = true)
	public void reload() {
	}
<#if businessCode == (moduleMapperKey?cap_first)>

	private CommonService commonService;
	
	public CommonService getCommonService() {
		return this.commonService;
	}
	
	public void setCommonService(CommonService commonService) {
		this.commonService = commonService;
	}
<#list moduleMapper.businessMap?values as localBusiness>
<#if (localBusiness.code!) != (moduleMapperKey?cap_first)>

	private ${localBusiness.code!}Service ${localBusiness.code?uncap_first}Service;
	
	public ${localBusiness.code!}Service get${localBusiness.code!}Service() {
		return this.${localBusiness.code?uncap_first}Service;
	}
	
	public void set${localBusiness.code!}Service(${localBusiness.code!}Service ${localBusiness.code?uncap_first}Service) {
		this.${localBusiness.code?uncap_first}Service = ${localBusiness.code?uncap_first}Service;
	}
</#if>
</#list>
<#else>

	private ${moduleMapperKey?cap_first}Service ${moduleMapperKey?uncap_first}Service;
	
	public void set${moduleMapperKey?cap_first}Service(${moduleMapperKey?cap_first}Service ${moduleMapperKey?uncap_first}Service) {
		this.${moduleMapperKey?uncap_first}Service = ${moduleMapperKey?uncap_first}Service;
	}
</#if>
}